Field of the Invention
The present invention relates to a drawing control technique of a printer driver.
Description of the Related Art
In the printing system of Microsoft Corporation, a graphics engine called a GDI (Graphic Device Interface) has been used conventionally. A conventional print processing flow using the GDI is as follows.
1) In response to instructions to perform printing from a user, a GDI application calls a GDI service function group and issues a GDI drawing command.
2) The issued GDI drawing command is spooled in a data format called an EMF (Enhanced Metafile) and delivered to a GDI printer driver (hereinafter, called a “GDI driver”).
3) The GDI driver converts drawing data including a GDI drawing command (hereinafter, called “GDI format drawing data”) into print data that can be interpreted by a printing apparatus (so-called PDL data) and inputs the print data to the printing apparatus.
It is assumed that the processing flow to perform printing from the GDI application via the GDI driver as described above is called a “GDI print path”. In recent years, to this GDI print path, a new print processing flow called an XPS print path has been added. The XPS is an XML based electronic document format and stands for XML Paper Specification. In the XPS print path, XPS format drawing data is generated by an application compatible with the XPS (hereinafter, called an “XPS application”), converted into print data by an XPS printer driver (hereinafter, called an “XPS driver”), and output to a printing apparatus.
The GDI print path and the XPS print path are not in an exclusive relationship and for example, it is possible to convert GDI format drawing data generated by a GDI application using the GDI into XPS format drawing data and to convert the XPS format drawing data into print data by an XPS driver. Further, conversely, it is also possible to convert XPS format drawing data by an XPS application into GDI format drawing data and to convert the GDI format drawing data into print data by a GDI driver. That is, a print processing flow to perform printing from a GDI application via an XPS driver and a print processing flow to perform printing from an XPS application via a GDI driver also exist. For example, in the case where printing is performed from a GDI application by using an XPS driver, GDI format drawing data is converted into XPS format drawing data by a conversion module. This conversion module is called MXDW (Microsoft XPS Document Writer). The drawing data converted into the XPS format is converted into print data by an XPS driver after being stored in an XPS spool file.
As described above, in the OS after Windows (registered trademark) VISTA, it is made possible to make use of the four print processing flows. Due to this, it is possible to cope with print processing of drawing data generated by both the GDI application and the XPS application by preparing at least one of the GDI driver and the XPS driver.
However, the specifications are different between the XPS format and the GDI format, and therefore, there are a variety of problems about format conversion of drawing data. As one of the examples, mention is made of a problem in that a print request in which an image to be printed is allocated to a portion that bulges out of a printable area is issued from the GDI application to the XPS driver. For this problem, there has been proposed a technique to perform control so that XPS format drawing data that is input to the XPS driver is printed within a printable area by determining whether the XPS format drawing data originates from the GDI application or the XPS application (Japanese Patent Laid-Open No. 2008-276745).
Then as the problem about the format conversion of drawing data, the presence of a problem about drawing of a graphics object has been made clear, in addition to the above-described problem. This problem is a problem in that in the case where object width=0 is specified in a graphics object drawing command, the object (e.g., line) is drawn or not depending on the printer driver. The problem results from that object width=0 in the GDI format means the minimum width that a device can display, but object width=0 in the XPS format means that the object is not at all drawn. That is, in the case where drawing data generated by a GDI application via the GDI includes a drawing command specifying drawing of a line with object width=0, the line is drawn on a condition that printing is performed by the GDI driver, but in the printing by the XPI driver, the line is not drawn. In the case where printing results considerably differ depending on the kind of printer driver that is made use of despite that the drawing command is issued from the same application and is the same, the printing quality is affected significantly.